<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ page import="com.gouwudai.gobbs.pojo.TbbsSysInfo"%>
<%@ include file="../../common/common.jsp"%>
<%@ include file="master_pass.jsp"%>
<%
masterLogin.hasPermission(1001);
//权限判断代码结束

boolean successFlag = false;
ISysInfoService service = (ISysInfoService) BeanManager.getBean("sysInfoService");
if (request.getMethod().equals("POST"))
{
   service.update(service.AutoBinding(request));
   successFlag = true;
}
TbbsSysInfo tbbsSysInfo = service.load();
%>
<html>
	<head>
		<title><%=SYSTITLE%> - 社区信息</title>
		<%@ include file="../../common/meta.inc"%>
		<link href="css.css" rel="stylesheet" type="text/css">
		<SCRIPT LANGUAGE="javascript" SRC="${pageContext.request.contextPath}/scripts/common-validator.js"></SCRIPT>
	<script language="javascript">
		<%if(successFlag) {%>
			sl_alert("保存成功！");
		<%}%>
	</script>	
	</head>
	<body>
		<table width="99%" border="0" align="center" cellpadding="2"
			cellspacing="2" bgcolor="#e6e6e6">
			<tr>
				<td align="center">
					<strong>配置社区基本信息</strong>
				</td>
			</tr>
		</table>
		<form name="form1" method="post" action="">
			<table width="99%" border="0" align="center" cellpadding="4"
				cellspacing="1" bgcolor="#e6e6e6">
				<tr bgcolor="#f6f6f6">
					<td width="150" height="22" bgcolor="#f6f6f6">
						<strong>社区名称</strong>
					</td>
					<td>
						<input name="sysName" type="text" id="sysName"
							value="<%=tbbsSysInfo.getSysName()%>" size="30" maxlength="30">
					</td>
				</tr>
				<tr bgcolor="#f6f6f6">
					<td height="1" bgcolor="#f6f6f6">
						<strong>访问网址</strong>
					</td>
					<td>
						<input name="sysUrl" type="text" id="sysUrl"
							value="<%=tbbsSysInfo.getSysUrl()%>" size="30" maxlength="50">
					</td>
				</tr>
				<tr bgcolor="#f6f6f6">
					<td height="2" bgcolor="#f6f6f6">
						<strong>Title网页标题</strong>
					</td>
					<td>
						<input name="sysTitle" type="text" id="sysTitle"
							value="<%=tbbsSysInfo.getSysTitle()%>" size="30">
					</td>
				</tr>
				<tr bgcolor="#f6f6f6">
					<td height="5" bgcolor="#f6f6f6">
						<strong>META关键词</strong>
					</td>
					<td>
						<input name="sysMetaKey" type="text" id="sysMetaKey"
							value="<%=tbbsSysInfo.getSysMetaKey()%>" size="30">
					</td>
				</tr>
				<tr bgcolor="#f6f6f6">
					<td height="5" bgcolor="#f6f6f6">
						<strong>META描述</strong>
					</td>
					<td>
						<input name="sysMetaDesc" type="text" id="sysMetaDesc"
							value="<%=tbbsSysInfo.getSysMetaDesc()%>" size="30">
					</td>
				</tr>
				<tr bgcolor="#f6f6f6">
					<td height="22" bgcolor="#f6f6f6">
						<strong>邮件SMTP服务器</strong>
					</td>
					<td>
						<input name="smtpServer" type="text" id="smtpServer"
							value="<%=tbbsSysInfo.getSmtpServer()%>" size="30" maxlength="50">
					</td>
				</tr>
				<tr bgcolor="#f6f6f6">
					<td height="22" bgcolor="#f6f6f6">
						<strong>SMTP身份验证</strong>
					</td>
					<td>
						<input type="radio" name="smtpAuth" value="0"
							<% if(!tbbsSysInfo.getSmtpAuth().booleanValue()){out.print("checked");}%>>
						不需要 &nbsp;&nbsp;&nbsp;&nbsp;
						<input type="radio" name="smtpAuth" value="1"
							<% if(tbbsSysInfo.getSmtpAuth().booleanValue()){out.print("checked");}%>>
						需要
					</td>
				</tr>
				<tr bgcolor="#f6f6f6">
					<td height="22" bgcolor="#f6f6f6">
						<strong>系统信件Email</strong>
					</td>
					<td>
						<input name="sysEmail" type="text" id="sysEmail"
							value="<%=tbbsSysInfo.getSysEmail()%>" size="30" maxlength="50">
					</td>
				</tr>
				<tr bgcolor="#f6f6f6">
					<td height="22" bgcolor="#f6f6f6">
						<strong>系统信件用户名</strong>
					</td>
					<td>
						<input name="sysEmailSign" type="text" id="sysEmailSign"
							value="<%=tbbsSysInfo.getSysEmailSign()%>" size="30"
							maxlength="50">
					</td>
				</tr>
				<tr bgcolor="#f6f6f6">
					<td height="22" bgcolor="#f6f6f6">
						<strong>系统SMTP登陆ID</strong>
					</td>
					<td>
						<input name="smtpId" type="text" id="smtpId"
							value="<%=tbbsSysInfo.getSmtpId()%>" size="30" maxlength="50">
					</td>
				</tr>
				<tr bgcolor="#f6f6f6">
					<td height="22" bgcolor="#f6f6f6">
						<strong>系统SMTP登陆密码</strong>
					</td>
					<td>
						<input name="smtpPass" type="password" id="smtpPass"
							value="<%=tbbsSysInfo.getSmtpPass()%>" size="30" maxlength="50">
					</td>
				</tr>
				<tr bgcolor="#f6f6f6">
					<td height="22" bgcolor="#f6f6f6">
						<strong>系统SMTP端口</strong>
					</td>
					<td>
						<input name="smtpPort" type="text" id="smtpPort"
							value="<%=tbbsSysInfo.getSmtpPort()%>" size="30" maxlength="50">
						无端口号请置空
					</td>
				</tr>
				<tr bgcolor="#f6f6f6">
					<td height="22" bgcolor="#f6f6f6">
						<strong>系统SMTP是否需要SSL</strong>
					</td>
					<td>
						<input name="smtpSsl" type="radio" value="false"
							<% if(!tbbsSysInfo.getSmtpSsl().booleanValue()){out.print("checked");}%>>
						不需要 &nbsp;&nbsp;&nbsp;&nbsp;
						<input name="smtpSsl" type="radio" value="true"
							<% if(tbbsSysInfo.getSmtpSsl().booleanValue()){out.print("checked");}%>>
						需要 （目前Gmail的SMTP服务是需要SSL验证的）
					</td>
				</tr>
				<tr bgcolor="#f6f6f6">
					<td height="22" bgcolor="#f6f6f6">
						<strong>社区左侧菜单</strong>
					</td>
					<td>
						<input type="radio" name="menuOpenFlag" value="false"
							<% if(!tbbsSysInfo.getMenuOpenFlag().booleanValue()){out.print("checked");}%>>
						默认关闭 &nbsp;&nbsp;&nbsp;&nbsp;
						<input type="radio" name="menuOpenFlag" value="true"
							<% if(tbbsSysInfo.getMenuOpenFlag().booleanValue()){out.print("checked");}%>>
						默认打开
					</td>
				</tr>
				<tr bgcolor="#f6f6f6">
					<td height="10" bgcolor="#f6f6f6">
						<strong>文件上传</strong>
					</td>
					<td>
						<input type="radio" name="upfileOpenFlag" value="false"
							<% if(!tbbsSysInfo.getUpfileOpenFlag().booleanValue()){out.print("checked");}%>>
						关闭 &nbsp;&nbsp;&nbsp;&nbsp;
						<input type="radio" name="upfileOpenFlag" value="true"
							<% if(tbbsSysInfo.getUpfileOpenFlag().booleanValue()){out.print("checked");}%>>
						开通
					</td>
				</tr>
				<tr bgcolor="#f6f6f6">
					<td height="10" bgcolor="#f6f6f6">
						<strong>个人形象上传</strong>
					</td>
					<td>
						<input type="radio" name="userpicOpenFlag" value="false"
							<% if(!tbbsSysInfo.getUserpicOpenFlag().booleanValue()){out.print("checked");}%>>
						关闭 &nbsp;&nbsp;&nbsp;&nbsp;
						<input type="radio" name="userpicOpenFlag" value="true"
							<% if(tbbsSysInfo.getUserpicOpenFlag().booleanValue()){out.print("checked");}%>>
						开通
					</td>
				<tr bgcolor="#f6f6f6">
					<td height="10" bgcolor="#f6f6f6">
						<strong>是否开启帖子审核机制</strong>
					</td>
					<td>
						<input type="radio" name="topicCheckFlag" value="true"
							<% if(tbbsSysInfo.getTopicCheckFlag().booleanValue()){out.print("checked");}%>>
						开启 &nbsp;&nbsp;&nbsp;&nbsp;
						<input type="radio" name="topicCheckFlag" value="false"
							<% if(!tbbsSysInfo.getTopicCheckFlag().booleanValue()){out.print("checked");}%>>
						不开启
					</td>
				</tr>
				<tr bgcolor="#f6f6f6">
					<td height="11" bgcolor="#f6f6f6">
						<strong>单个文件最大上传</strong>
					</td>
					<td>
						<input name="upfileMaxSize" type="text" id="upfileMaxSize"
							value="<%=tbbsSysInfo.getUpfileMaxSize()%>" size="20">
						(单位 Kb)
					</td>
				</tr>
				<tr bgcolor="#f6f6f6">
					<td height="22" bgcolor="#f6f6f6">
						<strong>默认的用户上传空间</strong>
					</td>
					<td>
						<input name="upfileDefaultSize" type="text" id="upfileDefaultSize"
							value="<%=tbbsSysInfo.getUpfileDefaultSize()%>" size="20">
						(单位 Kb)
					</td>
				</tr>
				<tr bgcolor="#f6f6f6">
					<td height="22" bgcolor="#f6f6f6">
						<p>
							<strong>允许的上传类型</strong>
							<br>
							<span class="remark">只需填入文件扩展名 </span>
						</p>
					</td>
					<td>
						<textarea name="upfileExt" cols="50" rows="2" id="clubUpfileExt"><%=tbbsSysInfo.getUpfileExt()%></textarea>
					</td>
				</tr>
				<tr bgcolor="#f6f6f6">
					<td height="22" bgcolor="#f6f6f6">
						<strong>访问上传文件的域名</strong>
					</td>
					<td>
						<input name="upfileDomain" type="text" id="upfileDomain"
							value="<%=tbbsSysInfo.getUpfileDomain()%>" size="50">
					</td>
				</tr>
				<tr bgcolor="#f6f6f6">
					<td height="22" bgcolor="#f6f6f6">
						热贴
					</td>
					<td>
						浏览大于等于
						<input name="isHottopic" type="text" id="isHottopic"
							value="<%=tbbsSysInfo.getIsHottopic()%>" size="3">
						&nbsp;&nbsp;&nbsp;&nbsp; 回复大于等于
						<input name="isHotre" type="text" id="isHotre"
							value="<%=tbbsSysInfo.getIsHotre()%>" size="3">
					</td>
				</tr>
				<tr bgcolor="#f6f6f6">
					<td height="22" bgcolor="#f6f6f6">
						<strong>版权归属</strong>
					</td>
					<td>
						<textarea name="copyright" cols="50" rows="2" id="copyright"><%=tbbsSysInfo.getCopyright()%></textarea>
					</td>
				</tr>
				<tr bgcolor="#f6f6f6">
					<td height="22" bgcolor="#f6f6f6">
						<strong>软件版本</strong>
					</td>
					<td>
						<input name="version" type="text" id="version"
							value="<%=tbbsSysInfo.getVersion()%>" size="10">
						输入软件版本号，如：3.0
					</td>
				</tr>
				<tr bgcolor="#f6f6f6">
					<td height="22" bgcolor="#f6f6f6">
						<strong>默认刷新时间</strong>
					</td>
					<td>
						<input name="refreshPage" type="text" id="refreshPage"
							value="<%=tbbsSysInfo.getRefreshPage()%>" size="20">
						单位秒
					</td>
				</tr>
				<tr bgcolor="#f6f6f6">
					<td height="22" bgcolor="#f6f6f6">
						&nbsp;
					</td>
					<td>
						<button name="btnSave" id="btnSave" class="btn btnEx" type="submit">保存</button>
					</td>
				</tr>
			</table>
		</form>
	</body>
</html>
